package com.xxy.springcloud.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxy.springcloud.entities.Payment;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

@Mapper
public interface PaymentDao  extends BaseMapper<Payment> {

    @Insert("insert into payment(serial) values(#{serial})")
    public int create(Payment payment);

    @Select("select * from payment where id=#{id}")
    public Payment getPaymentById(@Param("id") Long id);
}


